package org.vehicle.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.vehicle.dao.DriverInfoMapper;
import org.vehicle.entity.DriverInfo;
import org.vehicle.service.DriverInfoService;
import org.vehicle.service.base.BaseServiceImpl;
@Service
public class DriverInfoServiceImpl extends BaseServiceImpl<DriverInfo, Long> implements DriverInfoService{
	@Autowired
	private DriverInfoMapper driverInfoMapper;
	@Override
	public DriverInfo findDriverInfoByCertificateCode(String certificatecode) {
		
		return driverInfoMapper.findDriverInfoByCertificateCode(certificatecode);
	}
	@Override
	public int testDriverInfoByCertificateCode(Map<String, Object> paramMap) {
		
		return driverInfoMapper.testDriverInfoByCertificateCode(paramMap);
	}
	@Override
	public Map<String, Object> getDriverInfoPage(Map<String, Object> paramMap) {
		List<DriverInfo> blacklistList = driverInfoMapper.getDriverInfoList(paramMap);
    	Integer count = driverInfoMapper.getDriverInfoCount(paramMap);
    	//分页数据
    	Map<String, Object> dataMap = new HashMap<String, Object>();
    	dataMap.put("totalCount", count);
    	dataMap.put("list", blacklistList);
    	dataMap.put("currentPage", paramMap.get("currentPage"));
		return dataMap;
	}
    
}